package edu.depaul.se.courseregistration.sessionbean;

import edu.depaul.se.courseregistration.jpa.user.Person;
import java.util.List;
import javax.ejb.EJB;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
/**
 *
 * @author Group2
 */
@Stateless
@LocalBean
public class PersonSession {
    @EJB
    PersonEJB personEJB;    
    
    //Person business APIs
    public List<Person> getAllUsers() {
        return personEJB.getAllUsers();
    }
    
    public Person findPersonById(int personID) {
        return personEJB.findPersonById(personID);
    }
        
   public Person findPersonByFirstName(String firstName) {
       return personEJB.findPersonByFirstName(firstName);
    }    
        
    public Person findPersonByLastName(String lastName) {
        return personEJB.findPersonByLastName(lastName);
    }
    
   public Person findPersonByEmail(String email) {
        return personEJB.findPersonByEmail(email);
    }    
 
}